package com.mysiteforme.admin.service.impl;

import com.mysiteforme.admin.base.entity.Equipment;
import com.mysiteforme.admin.entity.DeviceInfo;
import com.mysiteforme.admin.dao.DeviceInfoDao;
import com.mysiteforme.admin.service.DeviceInfoService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 设备信息描述表 服务实现类
 * </p>
 *
 * @author wangl
 * @since 2019-02-22
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoDao, DeviceInfo> implements DeviceInfoService {

    @Autowired
    private DeviceInfoDao deviceInfoDao;


    public Equipment getEquipmentById(@Param("id") Integer id){
        return deviceInfoDao.getEquipmentById(id);
    }


    public List<Map<String,String>> getUserEquipmentIdList(@Param("uid") Integer uid){
        return deviceInfoDao.getUserEquipmentIdList(uid);
    }

}
